package com.citycloud.ccuap.tc.admin.constant;

public enum OauthErrorEnum {

    /** token不存在 */
    TOKEN_NOT_EXISTS(-1L,"token不存在"),

    /** token无效 */
    INVALID_TOKEN(-2L,"token无效")
    ;
    private Long code;
    private String desc;
    OauthErrorEnum(Long code,String desc){
        this.code=code;
        this.desc=desc;
    }
    public static String getDescByCode(Long code){
        if(code == null ){
            return null;
        }
        for (OauthErrorEnum appTypeEnum:values()){
            if(appTypeEnum.getCode().equals(code)){
                return appTypeEnum.getDesc();
            }
        }
        return null;
    }
    public Long getCode() {
        return code;
    }

    public void setCode(Long code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
